#include <iostream>
#include <cstdio>
using namespace std;

int main(){
	double a,b;
	cin>>a>>b;
	printf("%.2f",a-int(a/b)*b);
	return 0;
}
